﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JobShop.Properties;
using System.ComponentModel;

namespace JobShop
{
    public class TcProperties
    {
        [Description("Population Size")]
        public Int32 PopSize { get; set; }
        public Int32 GenSize { get; set; }
        public Single XoverRate { get; set; }
        public Single MutationRate { get; set; }
        public Single ElitismRate { get; set; }
        public TeCrossoverType XoverType { get; set; }
        public TeMutationType MutationType { get; set; }
        public Int32 MutationBits { get; set; }
        public Boolean UseElitism { get; set; }
        public Boolean UseProgressiveMutation { get; set; }
        public Boolean PreserveBest { get; set; }

        public TcProperties()
        {
            PopSize = Settings.Default.PopSize;
            GenSize = Settings.Default.GenSize;
            XoverRate = Settings.Default.XoverRate;
            MutationRate = Settings.Default.MutationRate;
            ElitismRate = Settings.Default.ElitismRate;
            XoverType = (TeCrossoverType)Settings.Default.XoverType;
            MutationType = (TeMutationType)Settings.Default.MutationType;
            MutationBits = Settings.Default.MutationBits;
            UseElitism = Settings.Default.UseElitism;
            UseProgressiveMutation = Settings.Default.UseProgressiveMutation;
            PreserveBest = Settings.Default.PreserveBest;
        }
    }
}
